<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>component</title>
</head>
<body>
    <div id="app">
        <count-input></count-input>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script>
    <script>

        Vue.component('count-input',{
            props:{
                coun:{
                    type:Number,
                    default:10
                }
            },
            data:function(){
                return{
                    conter = this.coun
                }
            },
            template:'<p @click="coun++">{{conter}}</p>'
        });

        var app = new Vue({
            el:'#app',
            data:{
                Pcounter:1
            }
        })
    </script>
</body>
</html>